Remove an extraneous is_test condition
authorAlex Crichton <alex@alexcrichton.com>
Sat, 21 Mar 2015 00:48:25 +0000 (17:48 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 21 Mar 2015 00:48:25 +0000 (17:48 -0700)
If a profile's `test` flag is set to true, then it will always generate a unit
test so the `is_test` check is redundant.

src/cargo/ops/cargo_rustc/fingerprint.rs

index 62407846e62c5ba93749c5ad1cc2fe1fa573c643..213a81c0158310daa6c359a7dccdd9279da23867 100644 (file)
@@ -62,7 +62,7 @@ pub fn prepare_target<'a, 'b>(cx: &mut Context<'a, 'b>,
             let dst = root.join(filename);
             missing_outputs |= fs::metadata(&dst).is_err();
 
-            if target.is_test() || profile.test {
+            if profile.test {
                 cx.compilation.tests.push((target.name().to_string(), dst));
             } else if target.is_bin() {
                 cx.compilation.binaries.push(dst);